package com.huiyeji.dynamic.core.builder;

import com.huiyeji.dynamic.core.DynamicRegex;
import com.huiyeji.dynamic.core.RegexContainer;
import com.huiyeji.dynamic.core.provider.ParamProvider;
import com.huiyeji.dynamic.core.provider.StringParamProvider;

import java.util.Collections;

public class StringParamProviderBuilder implements ParamProviderBuilder {

    @Override
    public ParamProvider build(String paramStr) {
        return new StringParamProvider(paramStr);
    }

    @Override
    public RegexContainer ruleInitialize() {
        return new RegexContainer(Collections.singletonList(
                DynamicRegex.PARAM_STRING.complete()
        ));
    }

    @Override
    public int getOrder() {
        return 0;
    }
}
